﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ReAnimation.Domain;

namespace ReAnimation.Graphics.Handlers.TwoAtomsSelect.States
{
    class FirstAtomSelectState: BaseState
    {
        public FirstAtomSelectState(TwoAtomsSelectHandler handler) : base(handler)
        {
        }

        public override void EnterState()
        {
            Handler.DeemphasizeSelected();
        }

        public override void AtomSelected(Atom atom)
        {
            Handler.MoleculeDrawer.DeemphasizeAtom(Handler.FirstSelectedAtom);
            Handler.FirstSelectedAtom = atom;
            Handler.MoleculeDrawer.EmphasizeAtom(atom, Handler.FirstSelectedAtomEmphasizeParams);
            Handler.CurrentStateType = TwoAtomsSelectStates.SecondAtomSelect;
        }
    }
}